const order = {
  state: {
    goodsListPage: 1,
    status: '',
    name: '',
    barCode: ''
  },
  mutations: {
    SAVE_GOODS_PAGE: (state, page) => {
      state.goodsListPage = page
    },
    SAVE_GOODS_STATUS: (state,status)=>{
        state.status = status
    },
    SAVE_GOODS_NAME: (state, name) => {
        state.name = name
    },
    SAVE_GOODS_BARCODE: (state, barCode) => {
      state.barCode = barCode
  },
  },
  actions: {
    saveGoodsListPage({
      commit
    }, page) {
      commit('SAVE_GOODS_PAGE', page)
    },
    saveGoodsListStatus({
        commit
    }, status) {
        commit('SAVE_GOODS_STATUS', status)
    },
    saveGoodsListName({
        commit
    }, name) {
        commit('SAVE_GOODS_NAME', name)
    },
    saveGoodsListBarCode({
      commit
  }, barCode) {
      commit('SAVE_GOODS_BARCODE', barCode)
  },
    
  }
}

export default order